import os

from flask import Flask
from flask_sqlalchemy import SQLAlchemy

from config import Config



db = SQLAlchemy()
localhost_url = "http://192.168.31.105:5000"


def create_app():
    app = Flask(__name__,static_folder='../static')

    app.config.from_object(Config)

    db.init_app(app)

    from apps.index import index_app
    app.register_blueprint(index_app)

    from apps.test import test_app
    app.register_blueprint(test_app)

    from apps.reco import reco_app
    app.register_blueprint(reco_app)

    from apps.data import data_app
    app.register_blueprint(data_app)
    return app